package edu.ua.cs.cs515.gcj.tetris;

/**
 * Produces tetrominos by using a strategy which is determined by the current score that
 * a user has reached.
 */
public class TetrominoFactory {
	
	// Reference to the Tetromino selection strategy object
	private TetrominoSelectionStrategy tetrominoSelectionStrategy;
	
	// Constuctor
	public TetrominoFactory() {
		tetrominoSelectionStrategy = new TetrominoSelectionStrategy();
	}
	
	// Selects a tetromino using the strategy
	public Tetromino selectTetromino(int score) {
		Tetromino tetromino = new Tetromino(tetrominoSelectionStrategy.getNext(score));
		return tetromino;
	}

}
